home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 428_02 / libsrc / hputs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-13  |  498 b   |  28 lines

  1. /*
  2. ** hputs.c
  3. **
  4. ** Pictor, Version 1.51, Copyright (c) 1992-94 SoftCircuits
  5. ** Redistributed by permission.
  6. */
  7.  
  8. #include "pictor.h"
  9.  
  10. /*
  11. ** Prints a string with one or more highlighted characters. Highlighted
  12. ** character are those that follow a tilde (~) characters.
  13. */
  14. void hputs(char *str,int hilite)
  15. {
  16.     int norm = _PL_color;;
  17.  
  18.     while(*str) {
  19.         if(*str == '~' && *(str + 1) != '~') {
  20.             str++;
  21.             vcolor(hilite);
  22.         }
  23.         vputc(*str++);
  24.         vcolor(norm);
  25.     }
  26.  
  27. } /* hputs */
  28.